Autofocusing cameras typically use edge and contrast detection methods to autofocus on objects. Among others, Ide (U.S. Pat. No. 6,157,783), Nishida (U.S. Pat. No. 5,710,662), Koyanage et al. (U.S. Pat. No. 5,352,882, and Kaneda (U.S. Pat. No. 5,027,147), all incorporated by reference, discuss the edge and contrast detection methods. If the contrast detection methods of autofocusing cameras are applied to endoscopic systems, such systems may have difficulties focusing on an object at a target site under harsh conditions. For example, a fogged body cavity environment, fumes from electrosurgery or laser surgery or a low contrast content of the field of view in general can prevent appropriate autofocusing on the internal target object. The situation is aggravated by relatively large depths of focus of endoscopes, especially of small diameter scopes. Thus, generally, an operator of an endoscopic system focus on the internal target object manually.
An apparatus and method according to the present invention allows for robust autofocusing operation regardless of contrast characteristics of the environment.
One aspect of the invention is a method for maintaining a focused image viewed by an autofocusing endoscope having an optical system including determining an transition between an imaging area and a non-imaging area, focusing the optical system on the transition, and storing in a memory a position of the optical system focused on the edge.
Embodiments of this aspect of the invention may include one or more of the following features. The method includes selecting at least a portion of the imaging area for focusing, determining a contrast value of at least the portion of the imaging area, comparing the contrast value of at least the portion of the imaging area with a preset value, moving the optical system to the position of the optical system stored in the memory to focus on the edge if the contrast value is below the preset value, and focusing the optical system on at least the portion of the imaging area if the contrast value is above the preset value. The contrast within the focusing zone can be checked at a predetermined frequency.
In another aspect of the invention, an article including a machine-readable medium that stores machine-executable instructions causes an endoscopic apparatus to determine an transition between an imaging area and a non-imaging area, focus the optical system on the transition, and store in a memory a position of the optical system focused on the edge.
The article can further cause the endoscopic apparatus to select at least a portion of the imaging area for focusing, determine a contrast value of at least the portion of the imaging area, compare the contrast value of at least the portion of the imaging area with a preset value, move the optical system to the position of the optical system stored in the memory to focus on the edge if the contrast value is below the preset value, and focus the optical system on at least the portion of the imaging area if the contrast value is above the preset value. The article can further cause the endoscopic apparatus to check the contrast within the focusing zone at a predetermined frequency.
In still another aspect of the invention, an endoscopic apparatus includes an optical system, an autofocusing module for focusing the optical system on a selected focusing zone, and a memory component for storing a position of the optical system focused on the edge. The selected focusing zone includes a zone around an edge between an imaging area and a non-imaging area. The autofocusing module includes an image size detector for finding the edge between the imaging area and the non-imaging area, a zone selector for selecting the focusing zone including the zone around the edge, and an edge detector for focusing the optical system on the edge.
The endoscopic apparatus can further include a driver for moving the optical system and a focus controller for controlling the driver. The focus controller can interact with the autofocusing module to focus the optical system on the edge.
Also, the endoscopic apparatus can include a photosensitive device for converting an image transmitted from the optical system into video signals. The video signals are transmitted to the autofocusing module for signal processing.
Among other advantages, the endoscopic apparatus and method of the present invention allow the optical system to focus on a field stop edgexe2x80x94the edge of a field of viewxe2x80x94and store default information of the apparatus focused on the edge. Later, if the apparatus fails to focus on an internal object during the course of normal operation, the apparatus recalls the default information from memory to focus the lens on the field stop edge. In the present invention, manual focusing is obviated. Thus, objects in front of the endoscopic apparatus are brought into reasonable focus for visualization automatically.
The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.